<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\controller;

/**
 * 学生服务控制器
 */
class Student extends AdminBase
{
    
    /**
     * 职务申请
     */
    public function studentDutie()
    {
        
        $this->assign('dutie', $this->logicStudent->getStudentDutie());
        
        return $this->fetch('student_dutie');
    }

     /**
     * 请销假
     */
    public function studentHols()
    {
        
        $this->assign('hols', $this->logicStudent->getStudentHols());
        
        return $this->fetch('student_hols');
    }

     /**
     * 班费管理
     */
    public function studentFee()
    {
        
        $this->assign('fee', $this->logicStudent->getStudentFee());
        
        return $this->fetch('student_fee');
    }

     /**
     * 资料共享
     */
    public function studentShare()
    {
        
        $this->assign('share', $this->logicStudent->getStudentShare());
        
        return $this->fetch('student_share');
    }

     /**
     * 贫困生管理
     */
    public function studentPoor()
    {
        
        $this->assign('poor', $this->logicStudent->getStudentPoor());
        
        return $this->fetch('student_poor');
    }
    
     /**
     * 奖学金管理
     */
    public function studentHonor()
    {
        
        $this->assign('honor', $this->logicStudent->getStudentHonor());
        
        return $this->fetch('student_honor');
    }
    

     /**
     * 综合测评
     */
    public function studentTest()
    {
        
        $this->assign('test', $this->logicStudent->getStudentTest());
        
        return $this->fetch('student_test');
    }
    

    /**
     * 添加
     */
    public function studentAdd()
    {
        
        IS_POST && $this->jump($this->logicStudent->studentEdit($this->param));
        
        return $this->fetch('student_edit');
    }
    
    /**
     * 编辑
     */
    public function studentEdit()
    {
        
        IS_POST && $this->jump($this->logicStudent->studentEdit($this->param));
        
        $info = $this->logicStudent->getStudentInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('student_edit');
    }
    
    /**
     * 删除
     */
    public function studentDel($id = 0)
    {
        
        $this->jump($this->logicStudent->studentDel(['id' => $id]));
    }
}
